2.1 Number Bases and Place Values
- Number bases are number systems; base ten is the decimal system used widely in daily life. Bases 2, 8, 10 and 16 are used in computer science. (p.34)
- Digits are the symbols used to form a number. Each base uses digits from 0 up to one less than the base (e.g. base two uses only 0 and 1). (p.35)
- Notation: 325 read as “three two base five”; the base is written as a subscript. (p.35)
- Place values are repeated multiplications of the base: a0, a1, a2, …, an (a = base, n = power; a4 = a × a × a × a). (p.35)
- Digit value = digit × place value of its position. (p.36)
- Number value = sum of the digit values (collection process). Base two has only digits 0 and 1; e.g. 110012 = 16 + 8 + 0 + 0 + 1 = 2510. (p.37)
- Writing the base sign for a base-ten number is optional. (p.38)
- Examples: 3405 = 95; 3417 = 176; 15068 = 838 (all in base ten). (p.39)
- Calculator check: MODE → BASE, choose the base (e.g. OCT), enter the number, then press DEC. (p.39)
2.1 Converting Between Bases
- A number can be converted using division by place value or division by the base value. (p.41)
- Base ten → another base (repeated division): divide by the base, record remainders, and read the digits from the bottom upwards. e.g. 56310 = 42235. (p.41)
- 56310 = 10638 (division by 8, remainders read from the bottom upwards). (p.42)
- Base p → base q: convert to base ten first, then to base q. e.g. 2536 = 10510 = 1269. (p.42)
- 3345 = 9410 = 10111102. (p.43)
- Base two → base eight: each base-eight digit equals three base-two digits. Separate the digits into groups of three from right to left, find each group’s value, then combine. e.g. 1101112 = 678. (p.43)
- 11011012 = 1558 (pad the leftmost group with leading zeros: 001 101 101). (p.44)
- Base eight → base two: convert each octal digit to three binary digits and combine. e.g. 5178 = 1010011112; 7258 = 1110101012. (p.44)
Base 2, base 10 and base 16 (p.44)
| Base 2 | Base 10 | Base 16 |
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |
Base 2 and base 8 equivalents (p.43)
| Base 2 | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
| Base 8 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
2.1 Addition and Subtraction in Various Bases
- Two methods: (a) vertical form, (b) convert to base ten, calculate, then convert the answer back to the required base. (p.45)
- Addition (vertical form): add digits from right to left; convert each column sum to the given base, write the units digit and carry the rest to the next place value. (p.46)
- 1102 + 1112 = 11012; 6738 + 1758 = 10708; 18379 + 7659 = 27139. (p.46)
- Subtraction (vertical form): subtract digits from right to left; when borrowing, transfer according to the base (e.g. use 6 in base six). The difference is always less than the base. (p.47)
- 40056 − 3256 = 32406. (p.47)
- 62417 − 6137 = 53257; 3728 − 778 = 2738; 18279 − 659 = 17529. (p.48)
2.1 Problem Solving
- Convert percentages to quantities first (e.g. 25% of 200 = 50), convert to the required base, then add or subtract as asked. (p.49)
- Check the answer by converting back to base ten (e.g. 80 + 50 = 13010 = 20024). (p.49)